package com.example.mybatis.dao;

import com.example.mybatis.pojo.Address;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface IUserMapper {
    @Select("insert into t_address (addr,phone,postcode,user_id) values (#{addr},#{phone},#{postcode},#{user_id})")
    Address getById(int id);
    @Delete("delete from t_address where id=#{id}")
    void delete(int i);
    @Update("update t_address set addr=145 where id=#{id}")
    void update(int i);
    @Insert(" insert into t_address (addr,phone,postcode,user_id) values (#{addr},#{phone},#{postcode},#{user_id})")
    void insert(Address address);

}
